﻿using OABLL;
using OAModel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MyOA
{
    public partial class Gongziguanli : Form
    {

        public string _yuangongid = string.Empty;

        GongziBLL bll = new GongziBLL();
        public Gongziguanli(string oa)
        {
           
            InitializeComponent();
            _yuangongid = oa;
            
        }


        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button3_Click(object sender, EventArgs e)
        {
           
            string key=this.txtid.Text.Trim();
            //在界面获取查找的数据
            List<GongziEntity> list = bll.Getgzi();
            //获取员工输入的员工id
            listView1.Items.Clear();

            for (int i = 0; i < list.Count; i++)
            {
              
                GongziEntity user = list[i];
                ListViewItem item = new ListViewItem();

                item.Text = user.Oa工资单id;
                item.SubItems.Add(user.Oa员工姓名);
                item.SubItems.Add(user.Oa员工id); 
                item.SubItems.Add(user.Oa金额);
                item.SubItems.Add(user.Oa领取时间);
                
                this.listView1.Items.Add(item);
            }



        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            new GongZiYiWen(_yuangongid).Show();
        }
    }
}
